package cn.edu.lingnan.service;

import cn.edu.lingnan.dao.StudentMapper;
import cn.edu.lingnan.pojo.Student;

import java.util.List;

public class StudentServiceMysqlImpl implements StudentService{
    private StudentMapper studentMapper;

    public void setStudentMapper(StudentMapper studentMapper) {
        this.studentMapper = studentMapper;
    }

    @Override
    public Student selectStudentByNameAndPassword(String sname, String password) {
        return studentMapper.selectStudentByNameAndPassword(sname,password);
    }

    @Override
    public int insertStudent(Student student) {
        return studentMapper.insertStudent(student);
    }

    @Override
    public List<Student> selectStudentAll() {
        return studentMapper.selectStudentAll();
    }

    @Override
    public int updateStudent(Student student) {
        return studentMapper.updateStudent(student);
    }

    @Override
    public Student selectStudentBySid(int sid) {
        return studentMapper.selectStudentBySid(sid);
    }
}
